﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Atendimento.Master" AutoEventWireup="true" Theme="Adm" CodeBehind="ConsultaPacientes.aspx.cs" Inherits="PROAD.atendimento.Consulta.ConsultaPacientes" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="IncludeHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="IncludeTitulo" runat="server">
<h1>Lista de Usuários Cadastrados na Equipe</h1>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="IncludeCaminho" runat="server">
<h1><a href="/atendimento/Forms/FormPaciente.aspx">Novo usuário em AD</a></h1>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="IncludeConteudo" runat="server">
 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
    <table width="100%">
        <tr>
            <td>Usuário em AD</td>
            <td>Cartão SUS ou Prontuário</td>
            <td>Sexo</td>
            <td>Situação</td>
            <td>&nbsp;</td>
        </tr>
         <tr>
            <td>
        <asp:TextBox ID="txtUsuario" runat="server" Width="409px"></asp:TextBox> </td>
            <td>
        <asp:TextBox ID="txtCpf" runat="server" Width="110px" MaxLength="14"></asp:TextBox>

        </td>
             
            <td><asp:DropDownList ID="ddlSexo" runat="server" Width="125px">
                    <asp:ListItem Value="0" Text="Selecione"></asp:ListItem>
                    <asp:ListItem Value="1" Text="Masculino"></asp:ListItem>
                    <asp:ListItem Value="2" Text="Feminino"></asp:ListItem>
             </asp:DropDownList></td>
            <td><asp:DropDownList ID="ddlSituacao" runat="server" Width="125px">
                    <asp:ListItem Value="7" Text="Selecione"></asp:ListItem>
                    <asp:ListItem Value="0" Text="Inativo"></asp:ListItem>
                    <asp:ListItem Value="1" Text="Ativo"></asp:ListItem>
                </asp:DropDownList></td>
            <td><asp:Button ID="btnPesquisa" runat="server" Text="Pesquisar Usuário" 
                    Width="118px" onclick="btnPesquisa_Click" /></td>
             
        </tr>
        <tr>
            <td colspan="5">&nbsp;</td>
        </tr>
         <tr>
            <td colspan="5">
                <asp:GridView ID="gdrUsuario" runat="server" SkinID="GridAdm" 
                    AutoGenerateColumns="false" Width="100%" 
                    onrowcommand="gdrUsuario_RowCommand" onrowdatabound="gdrUsuario_RowDataBound" 
                    >
                    <HeaderStyle HorizontalAlign="Left" />
                    <Columns>
                        <asp:TemplateField HeaderText="Usuário em AD">
                            <ItemTemplate>
                                <asp:LinkButton ID="lkbUsuario" runat="server" Text='<%# Eval("NO_NOME") %>' CommandArgument='<%# Eval("CO_USUARIO") %>' CommandName="Atendimento">
                               
                                </asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="" HeaderText="Tipo AD" />
                        <asp:BoundField DataField="DS_CPF" HeaderText="Cartão SUS ou Prontuário" />
                        <asp:BoundField DataField="DT_NASCIMENTO" HeaderText="Data de Nascimento" />
                        <asp:BoundField DataField="SEXO" HeaderText="Sexo" />
                        <asp:BoundField DataField="NR_STATUS" HeaderText="Situação" />
                        <asp:TemplateField HeaderText="Editar">
                            <ItemTemplate>
                                <asp:LinkButton ID="lkbEditar" runat="server"   CommandArgument='<%# Eval("CO_USUARIO") %>' CommandName="Editar">
                                <center><img src="../../common/imagem_sis/imagem_sis/editar.png" alt="Editar" border="0"  /></center>
                                </asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Migrar" >
                            <ItemTemplate>
                                <asp:LinkButton ID="lkbMigrar" runat="server" CommandArgument='<%# Eval("CO_USUARIO") %>' CommandName="Migrar" >
                                    <center><img src="../../common/imagem_sis/imagem_sis/transfer.png" alt="Migrar" border="0"  /></center>    
                                </asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Impressão">
                            <ItemTemplate>
                                <asp:LinkButton ID="lkbImp" runat="server"   CommandArgument='<%# Eval("CO_USUARIO") %>' CommandName="Imp">
                                <center><img src="../../common/imagem_sis/imagem_sis/Impre.png" alt="imp" border="0"  /></center>
                                </asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>                
            </td>
        </tr>
    </table>
    <!-- Área de Validação abaixo -->
             <div style="display:none;">
                 <asp:HyperLink ID="linkMsn" runat="server">HyperLink</asp:HyperLink>
             </div>
             <asp:ModalPopupExtender ID="ModalPopupMsn" runat="server" 
                 BackgroundCssClass="modalBackground" CancelControlID="btnCancelarMsn" 
                 PopupControlID="PainelMsn" TargetControlID="linkMsn">
             </asp:ModalPopupExtender>
             <asp:Panel ID="PainelMsn" runat="server" CssClass="modalPopup" 
                 Style="display:none" Width="350px">
                 <asp:Panel ID="PainelCabecalho" runat="server" 
                     Style="border-bottom:solid 1px Gray;height:25px;">
                     <div>
                         <h1 
                             style="line-height: 25px; text-align: center; margin: 0px 0px 0px 0px; vertical-align: bottom;
                            padding: 0px 0px 0px 0px; font-size: 14px; font-family: Verdana; background-color: #A4CFA2;">
                             <asp:Label ID="txtTituloMsn" runat="server"></asp:Label>
                         </h1>
                     </div>
                 </asp:Panel>
                 <div>
                     <br />
                     <h2 style="margin: 0px 0px 0px 0px; font-family: Verdana; font-size: 11px; font-weight: normal;
                        line-height: 25px; width: 100%; text-align: center;">
                         <asp:Label ID="txtTextoMsn" runat="server"></asp:Label>
                     </h2>
                     <br />
                     <table width="100%">
                         <tr>
                             <td align="center">
                                  
                                        <asp:Button ID="btnCancelarMsn" runat="server" Text="OK" />
                                   
                             </td>
                         </tr>
                     </table>
                 </div>
             </asp:Panel>
             <!-- Final Área de Validação -->

        </ContentTemplate>
        </asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="IncludeRodape" runat="server">
</asp:Content>
